{extend name="frame/base" /}
{block name="body"}
<table>
    <thead>
    <tr>
        <th>幻灯片标题</th>
        <th>幻灯片链接</th>
        <th>幻灯片排序</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="data"}
    <tr>
        <td>{$data['title']}</td>
        <td>{$data['href']}</td>
        <td>{$data['sort']}</td>
        <td><a href="/admin/slide/edit?id={$data['id']}">编辑</a><a href=""  onclick="del('{$data['id']}');return false">删除</a>
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$list->render()}
<script>
    function del(id) {
        if (confirm("请确认要删除此记录"))
            window.location.href = "/admin/slide/delete?id=" + id
    }
</script>
<br>
<a href="/admin/slide/edit" class="button">添加幻灯片</a>
{/block}
